//
//  LEDataInputStream.h
//  UMDReader
//
//  Created by 张 霄鹤 on 10-1-9.
//  Copyright 2010 xhzhang. All rights reserved.
//

#import <Foundation/Foundation.h>


@interface LEDataInputStream : NSObject {
	NSData *_data;
	NSInteger _length;
	NSInteger _pos;
	char *_buf;
	BOOL eof;
}

- (id)initWithData:(NSData *)d;

/**
 * 重新设置数据，并且位置设置为0
 */
- (void)reset:(NSData *)d;

- (NSInteger)read;

- (short)readShort;

- (NSInteger)readInt;

- (NSInteger)readBytes:(char *)buf withLength:(NSInteger)length;

- (char *)getCurrentBytesRefwithLength:(NSInteger)length retLength:(NSInteger *)rlen;

- (NSInteger)skip:(NSInteger)length;

@end
